import { defineStore } from 'pinia'
// 登录存储
export const loginStore = defineStore('login', {
  state: () => {
    return {
      loginData: { expires: 0 },
      redirect: '/'
    }
  },
  actions: {
    setLoginData (data) {
      this.loginData = data
    },
    setRedirect (data) {
      this.redirect = data
    }
  },
  persist: {
    enabled: true,
    storage: localStorage
  }
})
